<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<title>朋友圈发布</title>
	<link rel="stylesheet" type="text/css" href="/qy/css/public.css">
	<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css" />
	<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script>
	<style type="text/css">
		html{
			height: 100%;
		}
		body{
			height: 100%;
		}
		.friendPublish_container{
			height: 100%;
		}
		.friendPublish_content{
			height: 100%;
			position: relative;
		}
		.friendPublish_mainTextarea_container{
			display: flex;
		}
		.friendPublish_mainTextarea_container textarea{
			flex: 1;
			border: none;
			resize: none;
			height: 114px;
			padding: 10px;
			font-size: 15px;
			color: #353535;
			margin-bottom: 15px;
			font-family: "Microsoft YaHei";
		}
		.friendPublish_mainImg_container{
			position: relative;
			overflow: hidden;
			padding: 5px;
		}
		.friendPublish_mainImg_content{
			width: 88px;
			height: 88px;
			position: relative;
			float: left;
			margin: 10px 5px;
		}
		.friendPublish_mainImg_content img{
			width: 88px;
			height: 88px;
			display: block;
		}
		.friendPublish_mainImg_content svg{
			position: absolute;
			width: 10px;
			height: 10px;
			right: -9px;
			top: -7px;
			background: #eaeaea;
			padding: 5px;
			border-radius: 50%;
			display: block;
			fill: #909090;
		}
		.friendPublish_mainVideoAdd_container{
			width: 84px;
			height: 84px;
			position: relative;
			float: left;
			margin: 10px 5px;
			display: flex;
			justify-content: center;
			align-items: center;
			border: 2px solid #ececec;
		}
		.friendPublish_mainVideoAdd_container svg{
			width: 50px;
			height: 50px;
			display: block;
			fill: #cdcdcd;
		}
		.friendPublish_mainImgAdd_container{
			width: 84px;
			height: 84px;
			position: relative;
			float: left;
			margin: 10px 5px;
			display: flex;
			justify-content: center;
			align-items: center;
			border: 2px solid #ececec;
			cursor: pointer;
		}
		.friendPublish_mainImgAdd_container svg{
			width: 50px;
			height: 50px;
			display: block;
			fill: #cdcdcd;
		}
		.friendPublish_mainVideo_container{
			align-items: flex-end;
			display: flex;
			padding: 0 5px;
		}
		.friendPublish_mainVideo_content{
			margin: 10px 5px;
		}
		.friendPublish_mainLink_container{
			display: flex;
			padding: 10px;
		}
		.friendPublish_mainLink_container input{
			-webkit-appearance: none;
			border: 1px solid #ececec;
			flex: 1;
			font-size: 15px;
			padding: 10px;
			border-radius: 5px;
			color: #666;
			font-family: "Microsoft YaHei";
		}
		.friendPublish_submitButton_container{
			display: flex;
			padding: 0 25px;
			position: absolute;
			left: 0;
			right: 0;
			bottom: 50px;
		}
		.friendPublish_submitButton_container button{
			outline: none;
			-webkit-appearance: none;
			background: #5076b8;
			border: none;
			font-size: 15px;
			color: #fff;
			border-radius: 5px;
			flex: 1;
			padding: 10px;
		}
		.friendPublish_mainVideoImgAdd_container input{
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
			opacity: 0;
		}
	</style>
</head>
<body>
	<div class="friendPublish_container">
		<div class="friendPublish_content">
			<div class="friendPublish_main_container">
				<!-- 多行文本 -->
				<div class="friendPublish_mainTextarea_container">
					<textarea placeholder="输入想发表的内容" id="writing" name="writing">{$userPublish->writing}</textarea>
				</div>
				<!-- 图文链接 -->
				<div class="friendPublish_mainLink_container">
					<input type="text" name="link_url" id="link_url" value="{$userPublish->link_url}" placeholder="请输入图文链接,需加上http://或https://">
				</div>
			</div>
			<div class="friendPublish_submitButton_container">
				<button onclick="publish_imagetext()">发布</button>
			</div>
		</div>
	</div>
	<script src="/cdn/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script>
		function publish_imagetext(){
			var writing = $('#writing').val();
			var link_url = $('#link_url').val();
			if(!link_url){
				tusi("请输入图文链接");
				return false;
			}
			myAjaxPost(false, true, '', { writing:writing,link_url:link_url}, function (resp) {
				if (resp.status == 'success'){
					layer.msg(resp.msg);
						setTimeout(function(){
							window.history.back(-1);
						},1000);
				}else{
					layer.msg(resp.msg);
				}
			});
		}
	</script>
	<script type="text/javascript">
		$('.friendPublish_mainImg_content svg').click(function(){
			$(this).parent().remove();
		})
	</script>
</body>
</html>